Microsoft 11.0 Object Library In Office 2010

I Installed Office 2010 over the weekend and removed Office 2003 with the exception MS Access 2003 not thinking I would need the other programs.  I am a database programmer, and realized that i use references in VBA to call the Excel, and outlook object libraries in my code. These are both version 11. These are now missing.  All users are still on Office 2003, and i am having an issue becuase the VBA in Access 2003 cannot find the references while i am programming. I make the changes and the VBA references are looking for 14.0. I have to go to a Office 2003 machine and change the links.

This also leaves me unable to test some processes while missing 11.0 on my machine. Many outlook procedures have changed with the new version.

I am trying to resolve this without having to uninstall 2010, re-install 2003, and then 2020 again saving the older version.  Besides, I have used up the licenses for Office 2003.

Can i install Office 20003 while Office 2010 is present in the system?

Any help would be greatly appreciated.

I'm afraid that reinstalling Office 2003 while 2010 is present is not a good idea.

Would it be feasible to use a restore point to go back to before you installed Office 2010?

---
Best wishes, HansV
https://www.eileenslounge.com

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I have had good success using late binding method and then the reference does not need to be set in VBA.

Initially I develop using Early Binding by setting the reference so that I have the intellisense for the coding but I then convert to Late Binding.

You only need to re-dimension the variables to Object and  find the constant values to dimension them. You can find the constant values by opening the Immediate window (while the reference is still set) and then as per the following example.

?olMailItem

 

The following is an example of opening Outlook from another Office application and using Late Binding. You will see that I have attempted GetObject before CreateObject. Documentation indicates that you should be able to just use CreateObject and if Outlook is already open then not a problem. However, I have identified a problem where it creates multiple Processes if Outlook is busy receiving or sending mail at the critical time of CreateObject and the method I have used eliminates that.

Code has been tested in Office 2010, 2007, 2003 and 2002

 

Private Sub btnLateBindMethod_Click()
    'Use following Dim statements for Late Binding
    'NOTE: Additional Const declaration
    Dim objOutlook As Object    'Outlook.Application  (Note dimensioned as Object)
    Dim objEmail As Object      'Outlook.MailItem     (Note dimensioned as Object)
    Dim objNameSpace As Object  'Outlook.NameSpace    (Note dimensioned as Object)
    Const olMailItem As Long = 0    'For Late Binding
    Const olFolderInbox As Long = 6 'For Late Binding
    Const olFormatHTML As Long = 2  'For Late Binding
    Dim strSubject As String
    Dim strAddress As String
   
    On Error Resume Next
    Set objOutlook = GetObject(, "Outlook.Application")
    On Error GoTo 0     'Resume error trapping ASAP
   
    If objOutlook Is Nothing Then
        Set objOutlook = CreateObject("Outlook.Application")
        Set objNameSpace = objOutlook.GetNamespace("MAPI")
        objNameSpace.GetDefaultFolder(olFolderInbox).Display
    End If
   
    Set objEmail = objOutlook.CreateItem(olMailItem)
   
    strSubject = "My Test Message"
   
    With objEmail
   
        '.To = strToAddress  'Removed for privacy
       
        .Subject = strSubject
       
        .BodyFormat = olFormatHTML
       
        .Display
       
        'Full Name of window can change depending on Tools -> Options -> Mail Format
        'Changing this option for outgoing mail changes the window name.
        'However, AppActivate appears not to require entire name but needs up to end
        'of - Message which is included in heading following the Subject string
        'irrespective of the Mail Format option chosen.
        AppActivate (strSubject & " - Message")
   
    End With
   
End Sub

Regards,

OssieMac

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I Installed Office 2010 over the weekend and removed Office 2003 with the exception MS Access 2003 not thinking I would need the other programs.  I am a database programmer, and realized that i use references in VBA to call the Excel, and outlook object libraries in my code. These are both version 11. These are now missing.  All users are still on Office 2003, and i am having an issue becuase the VBA in Access 2003 cannot find the references while i am programming. I make the changes and the VBA references are looking for 14.0. I have to go to a Office 2003 machine and change the links.

This also leaves me unable to test some processes while missing 11.0 on my machine. Many outlook procedures have changed with the new version.

I am trying to resolve this without having to uninstall 2010, re-install 2003, and then 2020 again saving the older version.  Besides, I have used up the licenses for Office 2003.

Can i install Office 20003 while Office 2010 is present in the system?

Any help would be greatly appreciated.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Use the late binding method in your VBA code as described in my previous post on this thread and then the references are not needed and the versions of Office are not relevant unless you introduce functions etc that are available in later versions of Excel and not available in earlier versions.
Regards,

OssieMac

1 person found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated February 16, 2024 Views 6,984 Applies to: